<include file="Public:head" />
<style>

    .table-striped tr  .td_dan{
        line-height: 30px;text-align: right;width: 10%
    }
    .color_input{
        padding: 5px;
        width: 260px;
    }
</style>
<body class="overflow-hidden">
<div class="wrapper preload">
    <include file="Public:header" />
    <include file="Public:left" />
    <script>
        $(function () {

            $("#btnPrompt").click(function () {
                SimplePop.prompt("",{
                    type: "confirm",
                    cancel: function(){
                        alert("确定关闭？");
                    },
                    confirm: function(msg){
                        alert(msg);
                    }
                });
            });


        });
    </script>
    <div class="main-container">
        <div class="padding-md">
            <div class="row">
                <div class="col-sm-12">
                    <div class="page-title">
                        机构信息
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="smart-widget widget-green">
                        <table class="table table-striped no-margin">
                            <tr>
                                <td class="td_dan" >机构名称  <span style="color: red">*</span></td>
                                <td width="20%" style="text-align: left; line-height: 30px;">
                                    {$info.name}
                                </td>
                                <td class="td_dan">机构Email <span style="color: red">*</span</td>
                                <td width="40%"  style="text-align: left;line-height: 30px;">
                                    {$info.email}
                                </td>
                            </tr>
                            <tr>
                                <td class="td_dan" > 通信地址  <span style="color: red">*</span></td>
                                <td width="20%" style="text-align: left;line-height: 30px;">
                                    {$info.address}
                                <td class="td_dan">联系方式 <span style="color: red">*</span></td>
                                <td width="40%"  style="text-align: left;line-height: 30px;">
                                    {$info.tel}
                                </td>
                            </tr>
                            <tr>
                                <td class="td_dan" > 类型  <span style="color: red">*</span></td>
                                <td width="20%" style="text-align: left;line-height: 30px;">
                                    {$info.typeid|getTitleByType}
                                </td>
                                <eq name="info.typeid" value ="2">
                                    <td class="td_dan" > 挂靠单位  <span style="color: red">*</span></td>
                                    <td width="20%" style="text-align: left;line-height: 30px;">
                                        {$info.unit}
                                    </td>
                                </eq>
                            </tr>
                            <tr>
                                <td class="td_dan" >城市  <span style="color: red">*</span></td>
                                <td width="20%" style="text-align: left;line-height: 30px;">
                                    {$info.city|getCityName}
                                </td>
                                <td class="td_dan">账号 </td>
                                <td width="40%"  style="text-align: left;line-height: 30px;">
                                    {$info.username}
                                </td>
                            </tr>
                            <tr>
                                <td class="td_dan">查新范围 </td>
                                <td width="40%"  style="text-align: left;line-height: 30px;" colspan="3">
                                    <volist name="category" id="vo1" key="k">
                                        <volist name="info.categoryid" id="vo">
                                            <eq name="vo" value="$k"><font color="#60ab01" size="2">{$vo1['title']};</font></eq>
                                        </volist>
                                    </volist>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4"  >
                                    <!--<button type="submit" class="action-button" style="margin-left: 550px" onclick="window.open('{:U("Unit/edit",array("id"=>$info["id"]))}','_self')">修改</button>-->
                                    <button type="button" class="action-button" onclick="history.go(-1)" style="margin-left: 550px">返回</button>
                                </td>
                            </tr>

                        </table>
                    </div><!-- ./smart-widget -->
                </div><!-- ./col -->
            </div><!-- ./row -->
        </div><!-- ./padding-md -->
    </div><!-- /main-container -->
    <include file="Public:foot" />
</div><!-- /wrapper -->
<include file="Public/base_fc" />
<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>
</body>
</html>
<block name="script">
    <script>
        $(function(){
            highlight_nav2('{:U("Unit/index")}');

        })
        Think.setValue("typeId",{$info.typeid|default =1});
        <present name="info.id">
                Think.setValue("categoryid[]", {$info.categoryid|json_encode}||[0]);
        Think.setValue("typeId",{$info.typeid|default =1});
        </present>
        $(document).ready(function(){
            var obj_check = $('input[name="typeId"]:checked').val();
            if(obj_check==2){
                $("#unit").show();
                $('#categoryId').hide();
            }else if(obj_check==1){
                $('#unit').hide();
            }
        });
        $('input[name="typeId"]').change(function(){
            var typeId = $('input[name="typeId"]:checked').val();
            if(typeId==1){
                $('#unit').hide();
                $('#categoryId').show();
            }else if(typeId==2){
                $("#unit").show();
                $('#categoryId').hide();
            }
        });
    </script>
</block>
